<!-- popup.html -->
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <style>
        body {
            width: 280px;
            padding: 16px;
            margin: 0;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            font-size: 14px;
            color: #333;
        }

        .header {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 16px;
        }

        .switch-container {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
        }

        .switch {
            position: relative;
            display: inline-block;
            width: 44px;
            height: 22px;
        }

        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: 0.2s;
            border-radius: 22px;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: 0.2s;
            border-radius: 50%;
        }

        input:checked+.slider {
            background-color: #4CAF50;
        }

        input:checked+.slider:before {
            transform: translateX(22px);
        }

        /* 录制按钮样式 */
        #recordButton {
            width: 100%;
            padding: 8px;
            border: none;
            border-radius: 4px;
            color: white;
            font-weight: bold;
            cursor: pointer;
            margin: 12px 0;
            transition: background-color 0.2s;
        }

        #recordButton.start {
            background-color: #4CAF50;
            /* 绿色 */
        }

        #recordButton.stop {
            background-color: #f44336;
            /* 红色 */
        }

        .hint {
            color: #666;
            font-size: 12px;
            line-height: 1.5;
            margin-top: 8px;
        }
    </style>
</head>

<body>
    <div class="header">自动提取开关</div>

    <div class="switch-container">
        <label class="switch">
            <input type="checkbox" id="autoExtractToggle">
            <span class="slider"></span>
        </label>
        <span>启用自动复制</span>
    </div>

    <div class="switch-container">
        <label class="switch">
            <input type="checkbox" id="autoWrapToggle">
            <span class="slider"></span>
        </label>
        <span>复制内容自动换行</span>
    </div>

    <!-- 新增：录制按钮 -->
    <button id="recordButton" class="start">开始录制</button>

    <div class="hint">
        在企查查企业详情页自动提取并复制公司名称、注册号、统一代码。
    </div>

    <script src="popup.js"></script>
</body>

</html>